<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/



Route::get('/', 'LoginController@login')->name('login');//登录页面

Auth::routes();//auth登录
Route::get('/home', 'HomeController@index')->name('home');

Route::post('/dologin','LoginController@dologin')->name('dologin');//进行登录





//中间件判断session是否存在、如果不存在那么就进行登录
Route::group(['middleware'=>['AdminMiddwear']],function(){
    Route::get('/index', 'IndexController@index')->name('index');//网站首页
    
    Route::resource('/users', 'UsersController');//用户首页
    
    Route::resource('/wx', 'WxController');//用户首页
      Route::resource('/class', 'Class_typeController');//用户首页
      
    route::resource('/content','ContentController'); //评论
    
    Route::resource('/lunbo','LunboController');//轮播管理

    Route::post('/typeadd','TypeController@typeadd');//添加详情
    
    Route::resource('/product','ProductController');// 产品管理
    
    Route::resource('/link','LinkController');// 已预约
    
    Route::get('/sorry','LinkController@sorry');//
    
    Route::get('/logout','LoginController@logout')->name('logout');//退出
    
    Route::get('/infoedit/{id}','TypeController@infoedit');//修改infoedit
    
    Route::post('/infoupdate','TypeController@infoupdate');//修改 
    
    Route::resource('/type','TypeController');//公司类别管理
    
    Route::get('/typeinfo/{id}','TypeController@typeinfo')->name('typeinfo');//添加详情 展示添加页
    
    Route::get('/info/{id}','TypeController@info')->name('info');//添加详情 展示添加页
    
    Route::get('order/swoole/{id}','OrderController@swoole')->name('swoole');//添加详情 展示添加页
    
       Route::resource('/activity','ActivityController'); //订单管理系统
       
       
    
    route::resource('/order','OrderController'); //订单管理系统
      
      route::resource('/article','ArticleController'); //订单管理系统
    
     route::resource('/theorder','TheorderController'); //订单管理系统
     
     
    Route::resource('/expert','ExpertController');//专家管理
    
  
    
    
    Route::get('/null_top','ExpertController@null_top')->name('null_top');//取消专家推荐
     
    route::get('/is_top','TypeController@is_top')->name('is_top'); //专家推荐
     
     
     Route::get('/true_top','ProductController@true_top')->name('true_top');//产品推荐
     
     Route::get('/true_top','ProductController@true_top')->name('true_top');//取消产品推荐
     
     
     
     Route::resource('shop','ShopController');//医院类的商城
     
     Route::resource('host','HostController');//医院类的商城
      
      
     Route::resource('content','ContentController');//医院类的商城
       Route::resource('content','ContentController');//医院类的商城
     
     //Excel导出
    Route::get('/excel/export','ExcelController@export')->name('/excel/export');
     //Excel导入
   Route::get('/excel/import','Member\MemberController@import')->name('/excel/import');


});




Route::get('/onLogin','WxxcxController@getWxUserInfo');//微信用户信息



//得到预支付交易单
Route::post('prepay_id', 'WeiXinXPayController@requestPayment');
//小程序支付回掉
Route::any('notify', 'APi\WeiXinXPayController@notifyPay');











